﻿<%@ Page Language="C#" MasterPageFile="~/App_Master/AdminMaster2.master" AutoEventWireup="true"
    CodeFile="Article_List.aspx.cs" Inherits="management_Article_Article_List" Title="新闻管理" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../Css/Main.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="Header">
        <div class="header_Sub font14px clear">
            <ul> 
                <li>新闻列表</li>
            </ul>
        </div>
        <div class="header_Foot">
            <ul>
                <li class="Info_Add"><a href="Article_Add.aspx" >添加信息</a></li>
                <li class="bgColorG">
                    <asp:LinkButton ID="btn_delete" runat="server" Text="删除信息" CssClass="Info_Del" OnClick="btn_delete_Click"
                        OnClientClick="return confirm('确认要删除此行信息吗？')" /></li>
                  <li style="width: 230px;">&nbsp;文章分类：
                    <asp:DropDownList ID="dropCategory" runat="server" CssClass="droplsit" AutoPostBack="True"
                        OnSelectedIndexChanged="dropCategory_SelectedIndexChanged"/>
                </li> 
            </ul>
        </div>
    </div>
    <div class="container">
        <div class="gridbox">
            <asp:GridView ID="G1" runat="server" CssClass="mygrid" AutoGenerateColumns="false"
                DataKeyNames="Id" GridLines="None" OnRowDeleting="G1_RowDeleting" OnRowUpdating="G1_RowUpdating"
                OnRowDataBound="G1_RowDataBound" OnRowCreated="G1_RowCreated">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <input name="selectall" type="checkbox" value="全选" onclick="selall(this)" />全选
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="Remove" runat="server" onclick="selectObj(this)" />
                            <%# (this.AspNetPager1.CurrentPageIndex - 1) * this.AspNetPager1.PageSize + Container.DataItemIndex + 1%>
                            <asp:Label ID="lblpic" runat="server" Text='<%#Eval("PicUrl") %>' Visible="false" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="标题">
                        <ItemTemplate>
                            <a href='Article_Edit.aspx?p=<%#Eval("Id") %>&c=<%#Eval("CId") %>'>
                                <%#Eval("Title") %></a>&nbsp;
                            <asp:Label ID="lblHot" runat="server" ForeColor="Red" Visible="false" />
                        </ItemTemplate>
                    </asp:TemplateField> 
                    <asp:TemplateField HeaderText="添加时间">
                        <ItemTemplate>
                            <%#Eval("UpTime") %> 
                        </ItemTemplate>
                    </asp:TemplateField> 
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate> 
                            <a href='Article_Edit.aspx?p=<%#Eval("Id") %>&c=<%#Eval("CId") %>'>修改</a>·
                            <asp:LinkButton ID="btnDelete" runat="server" Text="删除" CommandName="Delete" OnClientClick="return confirm('确认要删除此行信息吗？')" />
                        </ItemTemplate>
                        <ItemStyle Width="150px" />
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <p>
                        ^_^ 暂无信息发布
                    </p>
                </EmptyDataTemplate>
            </asp:GridView>            
            <div class="page">
                <div class="black2">
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" NumericButtonTextFormatString="{0}"
                        OnPageChanging="AspNetPager1_PageChanging" ShowFirstLast="False" ShowInputBox="Never"
                        PageSize="14" HorizontalAlign="Center" CssClass="disabled" CurrentPageButtonClass="current">
                    </webdiyer:AspNetPager>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
